package com.springframework.jdbcT;

import com.alibaba.druid.pool.DruidDataSource;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestJdbc {
    @Test
    public void test1(){
        ApplicationContext context = new ClassPathXmlApplicationContext("jdbc/bean-jdbc.xml");
        DruidDataSource druidDataSource = context.getBean(DruidDataSource.class);
        System.out.println(druidDataSource.getUrl());
        System.out.println(druidDataSource.getPassword());
        System.out.println(druidDataSource.getUsername());
        System.out.println(druidDataSource);
    }
}
